﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brio.Framework.Operators
{
    public class SplitOperator : MusicalOperator
    {
        public SplitOperator(int percentage) : base("Split", percentage, OperatorType.Haploid) { }

        public override void Apply(MotifChromosome chromo)
        {
            int rIndex = Constants.Random.Next(chromo.Staff.Rhythm.Length);

            chromo.Staff.Split(rIndex);
        }

        public override void Apply(MotifChromosome doner, MotifChromosome reciever)
        {
            // UNSUPPORTED
        }

        public override void Apply(MotifChromosome chromo, TechniqueCollection techniqueCollection)
        {
            // UNSUPPORTED
        }

        public override void Apply(MotifChromosome chromo, IntervalRelationshipTable intervalRelationships)
        {
            // UNSUPPORTED
        }
   
    }
}
